package operation;

import book.Book;
import book.BookList;

import java.sql.SQLOutput;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 28779
 * Date: 2023-04-01
 * Time: 9:37
 */
public class AddOperation implements IOPeration{
    @Override
    public void work(BookList bookList) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入书名:>");
        String name = scanner.nextLine();
        System.out.println("请输入作者:>");
        String author = scanner.nextLine();
        System.out.println("此书的售价:>");
        int price = scanner.nextInt();
        System.out.println("此书的类型是:>");
        String type = scanner.nextLine();
        boolean isBorrowed;
        int currentSize = bookList.getUseSize() + 1;
        Book book = new Book(name,author,price,type);
        //Book book = bookList.getBook(currentSize - 1);
        System.out.println("新增图书"); //业务逻辑！！！
    }
}
